<template>
	<view>
		<index_1 v-if="moban==1"></index_1>
		<index_2 v-if="moban==2"></index_2>
	</view>
</template>

<script>
	var api = require('@/components/api.js');
	import index_1 from '@/pages/index/components/index_1.vue';
	import index_2 from '@/pages/index/components/index_2.vue';
	export default {
		components:{
			index_1,
			index_2
		},
		data() {
			return {
				moban:1
			}
		},
		onLoad() {
			
			// this.getui();
		},
		onReachBottom() {
			
		},
		onPullDownRefresh() {
			// this.refreshing = true;
			// this.getui()
		},
		methods: {
			getui(){
				let that = this
				uni.showLoading({
					title:'加载中...'
				})
				api.get({
					url: 'Common/GetUI',
					data: {},
					success: data => {
						uni.hideLoading()
						console.log(data);
						if (data.ErrCode == 0) {
							that.moban = data.Response
						}
						uni.stopPullDownRefresh();
					}
				});
			}

		}
	}
</script>

<style lang="scss">
	
</style>
